﻿@using Topro.Entity.Response.Menu;

@model List<MenuResponse>
@{
    ViewData["Title"] = "Topro.WMS";
}
<!--fram-wrap start-->
<div class="fram-wrap clearfix">
    <!--fram-aside start-->
    <aside class="fram-aside">
        <h3 class="fram-logo"><img src="~/images/logo.png" /></h3>
        <div id="side_menu" class="side-menu">
            <ul id="side_ul" class="side-ul">
                @if (Model != null)
                {
                    var menuList = Model.Where(p => p.ParentId == 0).OrderBy(x => x.DisplayOrder).ToList();
                    foreach (var item in menuList)
                    {
                        <li class="fir-li">
                            <a pageid="m@(item.Id)"><i></i><font>@item.Name</font></a>
                            <ul class="sec-ul">
                                @{
                                    var childMenuList = Model.Where(p => p.ParentId == item.Id).OrderBy(x => x.DisplayOrder).ToList();

                                    foreach (var childItem in childMenuList)
                                    {
                                        <li><a pageid="m@(item.Id)_@(childItem.Id)" targetpage="@childItem.Url">@childItem.Name</a></li>
                                    }
                                }
                            </ul>
                        </li>
                    }
                }
            </ul>
        </div>
    </aside>
    <!--fram-aside end-->
    <!--fram-article start-->
    <article class="fram-article open">
        <!--ftop-wrap start-->
        <header class="ftop-wrap clearfix case">
            <dl class="ftop-dl">
                @*<dt class="ftop-dt"><a id="menu_pack" href="javascript:void(0)"><i class="iconfont icon-menu icon-pack"></i></a></dt>*@
                <dd class="ftop-dd">
                    <a href="javascript:void(0)"><i class="iconfont icon-user"></i>@(ViewBag.UserName)</a>
                    <a href="javascript:void(0)" class="update-password" data-modal="/Home/ResetPassWord" data-title="修改密码" data-width="430" data-height="197"><i class="glyphicon glyphicon-edit"></i></a>
                    <a href="/Account/Logout" id="logout"><i class="iconfont icon-off"></i></a>
                </dd>
            </dl>
        </header>
        <!--ftop-wrap end-->
        <!--fscr-menu start-->
        <section id="fscr_menu" class="fscr-menu clearfix case">
            <div class="fscr-act">
                <a id="clearNav" href="javascript:void(0)"><i class="iconfont icon-clear"></i></a>
                <a id="refreshbox" href="javascript:void(0)"><i class="iconfont icon-repeat"></i></a>
            </div>
            <div class="fscr-nav" id="fscr_nav">
                <ul id="fscr_ul">
                    <li class="menuon" pageid="a1"><a id="home" class="gettext">首页</a></li>
                </ul>
                <div class="fscr-arrow">
                    <a id="left_scroll" href="javascript:void(0)"><i class="iconfont icon-menu-left"></i></a>
                    <a id="right_scroll" href="javascript:void(0)"><i class="iconfont icon-menu-right"></i></a>
                </div>
            </div>
        </section>
        <!--fscr-menu end-->
        <!--iframe-wrap start-->
        <section id="iframewrap" class="iframe-wrap">
            <iframe class="show" style="width: 100%" pageid="a1" frameborder="0" scrolling-x="no" id="ifmamedefault" src="/Home/Main"></iframe>
        </section>
        <!--iframe-wrap end-->
    </article>
    <!--fram-article end-->
</div>
<!--fram-wrap start-->
<script src="/js/framebox.js"></script>

<script type="text/javascript">
    function Tip_success(word) {
        Topro.UI.Tip_success(word);
    }
    function Tip_warning(word) {
        Topro.UI.Tip_warning(word);
    }
    function Login() {
        window.location.href = "/Account/Login";
    }
</script>